package com.jilefojing.beans.enums.forrsourceuser;

/**
 * 关系类型
 * 
 * @author jgshun
 * 
 */
public enum RelationTypeEnumForRSourceUser {
	/**
	 * (short) 1, "拥有者"
	 */
	OWNER((short) 1, "拥有者");

	private short code;
	private String msg;

	private RelationTypeEnumForRSourceUser(short code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public short getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}

	public static RelationTypeEnumForRSourceUser getRelationTypeByCode(Short code) {
		for (RelationTypeEnumForRSourceUser _Enum : RelationTypeEnumForRSourceUser.values()) {
			if (_Enum.getCode() == code) {
				return _Enum;
			}
		}
		return null;
	}

}
